-
-
Notifications
You must be signed in to change notification settings - Fork 44
Conversation
Could this be considering a breaking change? |
Co-Authored-By: Vincent Weevers <mail@vincentweevers.nl>
I think this fixes a bug - the docs say:
which was not the case if you used |
It breaks the expectation one might have that an empty prefix is treated as no prefix. |
True, but thats not the expectation I had 🤣 |
Wait, hang on - what do you mean by 'empty' here? My expectation was that passing an empty string If I passed |
That's true. Your use case (of not having a prefix) didn't come up before. |
In that sense it's a new feature so I'm making this semver-minor, be on the safe side. |
I'm splitting hairs now, but after reading ipfs/js-ipfs-repo#215 I see that @achingbrain ipfs is currently on |
5.0.1 |
No, I think we should upgrade to the latest version of level*. |
@achingbrain Doesn't that defeat the point of these backward compat fixes, seeing as |
Fair point, maybe a backport would be nice 😄 |
Alternatively you can use the |
I think we only use string keys and buffer values so that should be ok, right? UPGRADING.md says binary keys only and other types will be stringified? Also is there any performance degradation to running |
No, string keys of old databases will sort incorrectly. IndexedDB sorts by type in addition to "content" (by which I mean the raw bytes), so the key To get around that - and be compatible with how
Yes, because it doesn't check whether the database is already upgraded. Every time you call |
Ok, in that case, yes please on the backport! We'll handle the key migrations in the https://github.com/ipfs/js-ipfs-repo-migrations when it's ready. |
Working on the backport - but browser tests are failing in 4xx for an unrelated reason. Will update. |
This restores a previous behavior (of `level-js` < 3) that unknown to us, was provided by the since-removed IDBWrapper. Backport of #184.
This restores a previous behavior (of `level-js` < 3) that unknown to us, was provided by the since-removed IDBWrapper. Backport of #184.
Backport landed in 4.0.2 ( |
This PR changes the default behaviour of the constructor to allow empty prefixes in databases - previously if you passed
''
as the prefix it would set it tolevel-js-
.